package org.zerocouplage.web.component;

import org.zerocouplage.component.impl.component.ZCAbstractRadioButton;

public class ZCRadioButtonWeb extends ZCAbstractRadioButton {

	public Object display() {

		String component = "";

		int cmp = 0;

		while (cmp < getList().size()) {

			if (getChecked()) {
				component = "<input type=\"radio\" name=\"" + getName()
						+ "\" value=\"" + getValue()
						+ "\" checked=\"checked\"/>";
				cmp++;
			} else {
				component = "<input type=\"radio\" name=\"" + getName()
						+ "\" value=\"" + getValue() + "\" />";
				cmp++;
			}

		}
		return component;

	}   
}
